package com.pro.service.imple;

import com.pro.mapper.JsMicroLogMapper;
import com.pro.pojo.JsMicroLog;
import com.pro.service.JsMicroLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * ClassName:JsMicroLogServiceImple
 * Package:com.pro.service.imple
 * Description:
 *
 * @Date:2021/12/2 下午 8:43
 * @Author: WYH
 */
@Service
public class JsMicroLogServiceImple implements JsMicroLogService {

    @Autowired(required = false)
    private JsMicroLogMapper jsMicroLogMapper;

    @Override
    public Boolean addMicroLog(JsMicroLog jsMicroLog) {
        Boolean aBoolean = jsMicroLogMapper.addMicroLog(jsMicroLog);
        return aBoolean;
    }

    @Override
    public List<JsMicroLog> getAllMicroLog(String trueName, String createDate,Integer page, Integer limit) {
        page = (page-1)*limit;
        List<JsMicroLog> allMicroLog = jsMicroLogMapper.getAllMicroLog(trueName, createDate,page,limit);
        return allMicroLog;
    }

    @Override
    public int count(String trueName, String createDate) {
        int count = jsMicroLogMapper.count(trueName,createDate);
        return count;
    }

    @Override
    public Boolean delMicroLog(Integer logId) {
        Boolean aBoolean = jsMicroLogMapper.delMicroLog(logId);
        return aBoolean;
    }
}
